package com.freesky.web.manager.remote.order.fallback;

import com.freesky.common.pojo.DataTablesResult;
import com.freesky.common.utils.reponse.JSONResponse;
import com.freesky.common.utils.reponse.JSONResponseDiretor;
import com.freesky.common.vo.VOItem;
import com.freesky.web.manager.remote.order.ItemRemote;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ItemRemoteFallback implements ItemRemote {
    @Override
    public JSONResponse getItemById(String itemId) {
        log.error("商品服务调用出故障了");
        return null;
    }

    @Override
    public DataTablesResult getItemList(int draw, int start, int length, int cid, String search, int orderCol, String orderDir) {
        log.error("商品服务调用出故障了");
        return null;
    }

    @Override
    public DataTablesResult getItemSearchList(int draw, int start, int length, int cid, String searchKey, String minDate, String maxDate, String search, int orderCol, String orderDir) {
        log.error("商品服务调用出故障了");
        return null;
    }

    @Override
    public DataTablesResult getAllItemCount() {
        log.error("商品服务调用出故障了");
        return null;
    }

    @Override
    public JSONResponse stopItem(String id) {
        log.error("商品服务调用出故障了");
        return null;
    }

    @Override
    public JSONResponse startItem(String id) {
        log.error("商品服务调用出故障了");
        return null;
    }

    @Override
    public JSONResponse deleteItem(String[] ids) {
        log.error("商品服务调用出故障了");
        return null;
    }

    @Override
    public JSONResponse addItem(VOItem voItem) {
        log.error("商品添加服务维护中");
        return JSONResponseDiretor.buildBadServiceJSONResponse("商品添加服务维护中",null);
    }

    @Override
    public JSONResponse updateItem(String id, VOItem voItem) {
        log.error("商品服务调用出故障了");
        return null;
    }
}
